package Exceptions;

import be.kuleuven.cs.som.annotate.Basic;
import be.kuleuven.cs.som.annotate.Immutable;
import squarePackage.Square;

/**
 * A class that signals exceptions for invalid inhabitability exceptions for a square, triggered by an overflow of the class integere due to
 * 		the heat damage of the square to the power 3
 * Every exception contains the illegal heat damage and the square
 * 
 * @author Pieter & An
 *
 */

public class IllegalHeatDamageOverflowException extends Exception {
	

	/**
	 * The default serial number of the exception
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Initialize the new illegal heat damage overflow exception with given heat damage & given square
	 * @param 	heatDamage
	 * 			the heat damage that triggers the exception
	 * @param 	square
	 * 			the square for the illegal heat damage overflow exception
	 * @post	The heat damage of the new illegal heat damage overflow exception is the given heat damage
	 * 			|new.getHeatDamage() = heatDamage
	 * @post	The square of the new illegal heat damage overflow exception is the given square
	 * 			|new.getSquare() == square
	 */
	public IllegalHeatDamageOverflowException(int heatDamage, Square square) {
		this.heatDamage = heatDamage;
		this.square = square;
	}
	
	/**
	 * 
	 * @return the heatDamage of the illegal heat damage overflow exception
	 */
	@Basic @Immutable
	public int getHeatDamage(){
		return heatDamage;
	}

	/**
	 * Variable registering the temperature of the illegal heat damage overflow exception
	 */
	private final int heatDamage;
	
	/**
	 * @return the square of the illegal heat damage overflow exception
	 */
	@Basic @Immutable
	public Square getSquare(){
		return square;
	}
	
	/**
	 * Variable referring the square of the illegal heat damage overflow exception
	 */
	private final Square square;
	
}



